<template>
  <div>
    <div>计算属性方式：{{ reveres1 }}</div>
    <div>方法方式：{{ reveresMethod2() }}</div>
    <button @click="() => $forceUpdate()">改变</button>
    <input v-model="message">
  </div>
</template>

<script>
export default {
  name: "aCom",
  data() {
    return {
        message: 'Hello World'
    }
  },
  computed: {
    reveres1() {
        console.log('执行了reveres1');
        return this.message.split('').reverse().join('');
    }
  },
  methods: {
    reveresMethod2() {
        console.log('执行了reveresMethod2');
        return this.message.split('').reverse().join('');
    }
  }
};
</script>